<%@ page language="java" pageEncoding="UTF-8"%>
<%@include file="/global/global-head.jsp" %>
<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>吉车惠后台管理系统</title>
    <%@include file="/global/global-other.jsp" %>
    <script type="text/javascript">
        var $busiVehicle_insert = new Object();

        $(function() {
            submitForm = function($dialog,$gird){
                $('#an_car_form').form('submit',{
                    onSubmit:function(){
                        //return $(this).form('enableValidation').form('validate');
                        if($(this).form('enableValidation').form('validate')){
                            $("#btn_an_car_save").linkbutton("disable");
                            return true;
                        }else{
                            return false;
                        }
                    },
                    success:function(data){
                        var an_car_form = $('#an_car_form');
                        $.post('${ctx}/an/car/insert?_m=exec&r='+Math.random(), an_car_form.formSerialize(), function(json) {
                            if(statusMsg(json)){
                                $.messager.alert("提示","保存成功！","info",function(){
                                    $dialog.dialog('close');
                                    $gird.reload();
                                });
                            }else{
                                $("#btn_an_car_save").linkbutton("enable");
                            }
                        }, "JSON");
                    }
                });
            };

        });
    </script>
    </head>
<body>
<div class="form-box">
    <div class="form-body">
        <form role="form" name="an_car_form" id="an_car_form" class="easyui-form form form-horizontal" data-options="novalidate:true">
            <div class="seg-title">
                <div class="seg-title-box">
                    <ul>
                        <li class="seg-title-box-icon" ><img src="${ctx }/assets/images/communication.gif"/></li>
                        <li class="seg-title-box-text">基本信息1111</li>
                    </ul>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">
                    <p class="label-txt">app用户ID：</p>
                    <p class="star">*</p>
                </label>
                <div class="col-sm-3">
                    <input type="text" id="appUserId" name="appUserId"  class="form-control easyui-validatebox" style="width:100%;height:34px;line-height:34px;" required="required" validType="length[1,36]">
                </div>
                <label class="col-sm-2 control-label">
                    <p class="label-txt">车牌号：</p>
                    <p class="star">*</p>
                </label>
                <div class="col-sm-3">
                    <input type="text" id="plateNo" name="plateNo" class="form-control easyui-validatebox" style="width:100%;height:34px;line-height:34px;" required="required" validType="length[1,20]">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">
                    <p class="label-txt">发动机号：</p>
                    <p class="star">*</p>
                </label>
                <div class="col-sm-3">
                    <input type="text" id="engineNo" name="engineNo"  class="form-control easyui-validatebox" style="width:100%;height:34px;line-height:34px;" required="required" validType="length[1,36]">
                </div>
                <label class="col-sm-2 control-label">
                    <p class="label-txt">车架号：</p>
                    <p class="star">*</p>
                </label>
                <div class="col-sm-3">
                    <input type="text" id="carVin" name="carVin" class="form-control easyui-validatebox" style="width:100%;height:34px;line-height:34px;" required="required" validType="length[1,20]">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">
                    <p class="label-txt">排气量：</p>
                    <p class="star">*</p>
                </label>
                <div class="col-sm-3">
                    <input type="text" id="displacement" name="displacement"  class="form-control easyui-validatebox" style="width:100%;height:34px;line-height:34px;" required="required" validType="length[1,36]">
                </div>
                <label class="col-sm-2 control-label">
                    <p class="label-txt">品牌：</p>
                    <p class="star">*</p>
                </label>
                <div class="col-sm-3">
                    <input type="text" id="brandCode" name="brandCode" class="form-control easyui-validatebox" style="width:100%;height:34px;line-height:34px;" required="required" validType="length[1,20]">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">
                    <p class="label-txt">型号：</p>
                    <p class="star">*</p>
                </label>
                <div class="col-sm-3">
                    <input type="text" id="modelCode" name="modelCode" value="" class="form-control easyui-combobox" style="width:100%;height:34px;line-height:34px;" data-options="valueField: 'code',textField: 'name',url:'${ctx}/tcode/all/method?method=getCacheCdProvince',editable:false" required="required">
                </div>
                <label class="col-sm-2 control-label">
                    <p class="label-txt">车辆类型：</p>
                    <p class="star">*</p>
                </label>
                <div class="col-sm-3">
                    <input type="text" id="carType" name="carType" class="form-control easyui-combobox" style="width:100%;height:34px;line-height:34px;" required="required" data-options="
                    valueField: 'label',
                    textField: 'value',
                    data: [{
                        label: '01',
                        value: '小型车'
                    },{
                        label: '02',
                        value: '大型车'
                    }],editable:false" />
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">
                    <p class="label-txt">使用性质：</p>
                    <p class="star">*</p>
                </label>
                <div class="col-sm-3">
                    <input type="text" id="useType" name="useType" class="form-control easyui-combobox" style="width:100%;height:34px;line-height:34px;" required="required" data-options="
                    valueField: 'label',
                    textField: 'value',
                    data: [{
                        label: '1',
                        value: '营运'
                    },{
                        label: '2',
                        value: '非营运'
                    }],editable:false" />
                </div>
                <label class="col-sm-2 control-label">
                    <p class="label-txt">是否默认：</p>
                    <p class="star">*</p>
                </label>
                <div class="col-sm-3">
                    <input type="text" id="isDefault" name="isDefault" class="form-control easyui-combobox" style="width:100%;height:34px;line-height:34px;" required="required" data-options="
                    valueField: 'label',
                    textField: 'value',
                    data: [{
                        label: '1',
                        value: '是'
                    },{
                        label: '2',
                        value: '否'
                    }],editable:false" />
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">
                    <p class="label-txt">初次登记日期：</p>
                    <p class="star">*</p>
                </label>
                <div class="col-sm-3">
                    <input type="text" id="recordDate" name="recordDate" value="" class="form-control easyui-datebox" data-options="editable:false" style="width:100%;height:34px;line-height:34px;" required="required">
                </div>
                <label class="col-sm-2 control-label">
                    <p class="label-txt">核定载客数：</p>
                    <p class="star">*</p>
                </label>
                <div class="col-sm-3">
                    <input type="text" id="approvedNumber" name="approvedNumber" value="" class="form-control easyui-validatebox" style="width:100%;height:34px;line-height:34px;" required="required">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">
                    <p class="label-txt">车主姓名：</p>
                    <p class="star">*</p>
                </label>
                <div class="col-sm-3">
                    <input type="text" id="ownerName" name="ownerName" value="" class="form-control easyui-validatebox" style="width:100%;height:34px;line-height:34px;" required="required">
                </div>
                <label class="col-sm-2 control-label">
                    <p class="label-txt">车主身份号：</p>
                    <p class="star">*</p>
                </label>
                <div class="col-sm-3">
                    <input type="text" id="ownerCard" name="ownerCard" value="" class="form-control easyui-validatebox" style="width:100%;height:34px;line-height:34px;" required="required">
                </div>
            </div>
        </form>
    </div>
</div>
</body>
</html>